package com.bwie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.Province;
import com.bwie.service.ProvinceService;
import com.bwie.mapper.ProvinceMapper;
import com.bwie.utils.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 61630
* @description 针对表【tb_province】的数据库操作Service实现
* @createDate 2024-08-06 14:45:18
*/
@Service
public class ProvinceServiceImpl extends ServiceImpl<ProvinceMapper, Province>
    implements ProvinceService{

    @Resource
    private ProvinceMapper provinceMapper;
    @Override
    public R getProvinceList(Integer id) {
        QueryWrapper<Province> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(Province::getProvinceNum,id);
        List<Province> provinceList = provinceMapper.selectList(wrapper);
        return R.success(provinceList);
    }
}




